﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Genealogy_Builder
{
    public class HasTrait
    {
        public Person PersonA;
        public Trait the_trait;

        public HasTrait(Person A, Trait t)
        {
            PersonA = A;
            the_trait = t;
        }

        public override string ToString()
        {
            string traitString;
            if (the_trait != null)
            {
                traitString = PersonA.name + " - " + the_trait.trait_name;
            }
            else
            {
                traitString = PersonA.name;
            }
            return traitString;
        }
    }
}
